<?php


namespace App\Http\Model\Console;


use Illuminate\Support\Facades\DB;

class DwCronModel
{

    /**
     * 查询指定任务记录
     *
     * @param $where
     *
     * @return array|false|mixed
     */
    public static function data($where)
    {
        $data = DB::select('SELECT `id`,`status` FROM `dw_lock_history` WHERE `data_date`=:data_date AND `db`=:db AND `table_name`=:table_name AND `is_del`=0 LIMIT 1', [
            'data_date'  => $where['date'],
            'db'         => $where['db'],
            'table_name' => $where['table'],
        ]);
        return empty($data) ? [] : current($data);
    }

}





/**
 * DwCronModel.php
 *
 * 说明:
 *
 * 修改历史
 * ----------------------------------------
 * 2021/6/21 11:34:00   操作:创建
 **/
